This invention relates to video scaling operations.
A digital video scaler is a device that accepts an input image and creates a new output image of different dimensions. A digital video scaler can scale in either the horizontal or the vertical direction.
One objective of digital video scalers is to avoid aliasing artifacts. When the video signal is sampled, the signal is typically sampled at greater than twice the frequency of the signal, known as the Nyquist sampling rate. This ensures the aliasing of the signal is avoided. Aliasing causes unwanted distortion of the original signal. For example, a high-frequency signal, sampled too infrequently, may contain low frequencies that really aren't there.
Whether the size of a video image is increased or decreased, aliasing may be a problem. For example, where an image is scaled down 2:1, say, by discarding half the pixels representing the image, the sampling rate has also been cut in half relative to the original Nyquist sampling rate. The image after scaling may possibly include aliasing artifacts.
Digital video scalers thus typically employ finite impulse response (FIR) filters to scale the video images. An FIR filter receives many data points, or pixels, to generate a single output pixel. A simple averaging FIR filter may receive two or more pixels, average them, and produce an output pixel, for example. The result is a filtered signal.
To scale a signal, the FIR filter receives discrete representations of the signal, or data points, one after the other. The FIR filter performs operations on the data points to produce a resulting data point. Once the signal is filtered, the scaler may discard some of the pixels, yet the resulting scaled output is free of aliasing artifacts.
For video images, the data points are typically pixels. For example, under one digital video standard, an image is sampled at 13.5 MHz. This sampling rate produces 30 frames (or 60 interlaced fields) of image data where the frames include a matrix of pixels, with 720 horizontal pixels by 480 vertical pixels or 480 rows of pixels. Each pixel is received sequentially, starting with all the pixels on the first row, then all the pixels on the second row and so on.
To scale a video image in the horizontal direction, the FIR filter receives each pixel in a selected row, until the FIR filter is filled. The ordering of the pixels received is convenient for horizontal scaling. A simple first-in-first-out (FIFO) memory may receive the pixels into the FIR filter, for example.
Scaling the video image in the vertical direction, however, is not as simple as with horizontal scaling. The FIR filter does not receive the pixels in a convenient way for vertical scaling. Under the above digital video standard, for example, the vertical scaler receives a first pixel in the first row. The next 719 pixels are in the horizontal, not vertical, direction of the frame. Thus, the vertical scaler must wait for the 720th pixel after the first pixel, discard 720 pixels immediately following that then retrieve every 720th pixel until all the vertical pixels are retrieved.
Since the video data is sent horizontally, vertical scalers typically retrieve the pixels from line memories rather than as the original input stream. The vertical scaler may retrieve each vertical pixel from the line memories to perform the scaling operation.
The cost impact of vertical scaling is evident. Higher-quality FIR filters generally include more taps than lower quality FIR filters. Since the amount of available data for processing is less for vertical scaling than for horizontal scaling, vertical scalers typically employ less sophisticated FIR filters (e.g., ones with fewer taps) while horizontal scalers operating on the same video data stream may include many more taps. Where high-quality horizontal scaling may be achieved with a simple FIFO, vertical scaling of a similar quality requires a substantial amount of memory.
Thus, there is a continuing need to improve the efficiency of video scaling operations.